<!DOCTYPE html>
<html>
<#include "/views/ftl/base/manager_include.ftl">
<script type="text/javascript" src="${basePath}js/My97DatePicker/WdatePicker.js"></script>
<base href="${basePath}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表</title> 
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl"> 
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "创建账号_List"></#function> 
<!--右边内容-->
<div class="Rightbox fl">
    <!--导航-->
    <div class="Bread_crbs clear">
      <div class="Bread_crbs_img fl"></div>
      <div class="Bread_crbs_text fl">
      	<a href="javascript:void(0);"><span>用户管理</span></a>
      	<span class="fnt_famy">></span>
      	<a href="javascript:void(0);"><span>创建账号</span></a>
      </div>
    </div>
      <div class="Table">
        </div>
  <!--表格列表-->
        <div class="Table"> 
          
          <div class="input_name">
             <span class="left_title">用户名：</span>
             <input type="text" name="userName" class="search_text tdd50" style="width:210px" value=""> 
          </div>
          
          <div class="input_name">
             <span class="left_title">会员邮箱(重要)：</span>
             <input type="text" name="email" class="search_text tdd50" style="width:210px" value=""> 
          </div>
          
          <div class="input_name">
             <span class="left_title">密码：</span>
             <input type="text" name="passWord" class="search_text tdd50" style="width:210px" value=""> 
          </div>
          <div class="input_name">
             <span class="left_title">确认密码：</span>
             <input type="text" name="rePassWord" class="search_text tdd50" style="width:210px" value=""> 
          </div> 
          
          <span class="tbl_btn" style="margin-left: 300px;"> 
             <a href="javascript:void(0);"><span id="save" style="background: #0075c5;">保存</span></a>
          </span>
          
        </div>
</div> 
<script>  
$(function(){
	
	$("#save").click(function(){  
		var userName = $("input[name=userName]").val(); 
		var passWord = $("input[name=passWord]").val(); 
		var rePassWord = $("input[name=rePassWord]").val(); 
		var email = $("input[name=email]").val(); 
		
		if(userName==''){
			alert("用户名不能为空");
			return;
		}
		if(email==''){
			alert("邮箱不能为空");
			return;
		}
		
		if(passWord=='' || rePassWord ==''){
			alert("密码不能为空");
			return;
		}
		
		if(passWord!=rePassWord){
			alert("两次输入的密码不一致");
			return;
		}
		
		
		$.ajax({ 
			url : "${basePath}manager/User_createUserAccount",
			data : { 
				userName:userName,
				email:email,
				passWord:passWord,
				rePassWord:rePassWord
			}, 
			dataType :"JSON",
			cache : false, 
			type : "POST",
			success : function(dat){
				if(dat.code==1){
					alert(dat.msg);
					window.location.href="${basePath}manager/User_userInfo?userId="+dat.data.userId;
				}else{
					alert(dat.msg);	
				} 
			}
		});
	});

});

</script>
</body>
</html>

